<script>

export default {
  name: "SidebarNav",
  props: {
    modules: Array
  },
  data() {
    return {
      path: 'paper'
    }
  },
  mounted() {
    this.path = this.$route.name
  },
}
</script>

<template>
  <el-menu :default-active="path" router>
    <el-menu-item style="width: 200px" v-for="module in modules" :index="module.modDbTable" :key="module.id">
      <i class="iconfont" :class="module.icon"></i>
      <span>{{ module.modTitle }}</span>
      <span style="float:right; right: 0">{{ module.files }}份</span>
    </el-menu-item>
  </el-menu>
</template>

<style scoped>

</style>
